#include<stdio.h>
int main(void){
    int num,number,number_=0;
    scanf("%d",&number);
    while(1){
        num = number%10;
        number /= 10;
        number_ = number_*10 + num;
        if(number==0){
            printf("%d",number_);
            break;
        }
    }
    return 0;
}